const state = {
    username: '郭大聪',
    permissions: [],
    status: 1
}
const getters = {
    statusTitle: (state) => {
        switch (state.status) {
            case 1:
                return '正常'
            case 2:
                return '禁用'
            default:
                return '略略'
        }
    }
}
const actions = {
    toggleStatus({ state, commit }, status) {
        console.log(state);
        commit('toggleStatus', status)
    }
}
const mutations = {
    toggleStatus(state, status) {
        state.status = status
    }
}
export default {
    namespaced: true,
    state,
    getters,
    actions,
    mutations,
}
